<extend name="Public/base"/>

<block name="body">
    <div class="main-title">
        <h2>编辑[管理员]</h2>
    </div>
    <form action="{:U('edit',array('id'=>I('id')))}" onsubmit = "check();" method="post" class="form-horizontal tab-list">
        <div class="form-item">
            <label class="item-label">用户名<span class="check-tips">（用户名会作为默认的昵称）</span></label>
            <div class="controls">
                <input type="text" class="text input-large" value="{$list.username}" disabled="disabled">
                <input type="hidden" class="text input-large" name="username" value="{$list.username}" >
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">密码<span class="check-tips">（用户密码不能少于6位）</span></label>
            <div class="controls">
                <input type="password" class="text input-large" id="password" name="password" value="{$list.password}">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">邮箱<span class="check-tips">（用户邮箱，用于找回密码等安全操作）</span></label>
            <div class="controls">
                <input type="text" class="text input-large" name="email" value="{$list.email}">
            </div>
        </div>
        <div class="form-item">
             <label class="item-label">所属权限</label>
            
            <select name="auth" id="authid">
                <volist name="lists" id="sd">
                    <option value="{$sd['id']}">{$sd['title']}</option>    
                </volist>
            </select>
        </div>
        <div class="form-item">
             <label class="item-label">所属后台<span class="check-tips">（管理员可以访问的后台）</span></label>
            <select name="houtai">
            <option value="0"<eq name="houtai" value='0'>selected='selected'</eq>>总后台</option>
                    <option value="1" <eq name="houtai" value='1'>selected='selected'</eq>>商务后台</option>
            </select>
        </div>
        <div class="form-item">
            <button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal">确 定</button>
            <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
        </div>
    </form>
</block>

<block name="script">
    <script type="text/javascript">
        Think.setValue("auth", {$authid|default = 0});

        //导航高亮
        highlight_subnav('{:U('User/index')}');
    </script>
</block>
